package com.sysu.ooad.dto;

import java.util.HashSet;
import java.util.Set;

import com.sysu.ooad.entity.Course;
import com.sysu.ooad.entity.Group;
import com.sysu.ooad.entity.Student;

public class GroupFacade {
	private Group group;
	private Integer id;
	private String name;
	private StudentFacade leader;
	private Set<StudentFacade> students = new HashSet<StudentFacade>();
	
	public GroupFacade() {
		
	}
	
	public GroupFacade(Group group) {
		this.group = group;
		for(Student s : group.getStudents()) {
			students.add(new StudentFacade(s));
		}
	}

	public Integer getId() {
		return group.getId();
	}

	public String getName() {
		return group.getName();
	}

	public StudentFacade getLeader() {
		return new StudentFacade(group.getLeader());
	}

	public Set<StudentFacade> getStudents() {
		return students;
	}
}
